<!DOCTYPE html>
<html> 
    <br style="clear: both;" />
    <head>
        <?php echo $this->Html->charset(); ?>
        <title>
            <?php echo $title_for_layout; ?>
        </title>
        <?php
        echo $this->Html->meta('icon');

        //echo $this->Html->script('http://code.jquery.com/jquery-1.9.1.js');
        echo $this->Html->script('jquery-1.9.1.js');
        echo $this->Html->script('jquery.dataTables');
        echo $this->Html->script('http://code.jquery.com/ui/1.10.3/jquery-ui.js');
        echo $this->Html->script('bootstrap.js');


        echo $this->Html->css('http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css');
        echo $this->Html->css('bootstrap');

        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');
        ?>
        <style type="text/css">

            .invertedshiftdown{
                padding: 0;
                width: 100%;
                border-top: 5px solid #45bbc2; /*Horizontal line*/
                background: transparent;
                voice-family: "\"}\"";
            voice-family: inherit;
            }

            .invertedshiftdown ul{
                margin:0;
                margin-left: 2.5%; /*margin between first menu item and left browser edge*/
                padding: 0;
                list-style: none;
            }

            .invertedshiftdown li{
                display: inline;
                margin: 0 2px 0 0;
                padding: 0;
                text-transform:uppercase;
                
            }

            .invertedshiftdown a{
                float: left;
                display: block;
                font: bold 12px Arial;
                color: black;
                text-decoration: none;
                margin: 0 1px 0 0; /*Margin between each menu item*/
                padding: 5px 10px 9px 10px; /*Padding within each menu item*/
                background-color: #d9f1f2; /*Default menu color*/

                /*BELOW 4 LINES add rounded bottom corners to each menu item.
                  ONLY WORKS IN FIREFOX AND FUTURE CSS3 CAPABLE BROWSERS
                  REMOVE IF DESIRED*/
                -moz-border-radius-bottomleft: 5px;
                border-bottom-left-radius: 5px;
                -moz-border-radius-bottomright: 5px;
                border-bottom-right-radius: 5px;
                width:9.5em;
                
            }

            .invertedshiftdown a:hover{
                background-color: #D10000; /*Red color theme*/
                padding-top: 9px; /*Flip default padding-top value with padding-bottom */
                padding-bottom: 5px; /*Flip default padding-bottom value with padding-top*/
                color: white;
            }

            .invertedshiftdown .current a{ /** currently selected menu item **/
                background-color: #D10000; /*Red color theme*/
                padding-top: 9px; /*Flip default padding-top value with padding-bottom */
                padding-bottom: 5px; /*Flip default padding-bottom value with padding-top*/
                color: white;
                
            }


        </style>
    </head>
    <body>

        <h1>Lstudio</h1>


        <div class="invertedshiftdown">

            <ul>
                <?php if ($this->Session->read('Auth.User.role') == "admin") { ?>
                    <li><?php echo $this->Html->link('Home', '/pages/home'); ?> </li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">Products <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><?php echo $this->Html->link('View Products', array('controller' => 'products', 'action' => 'index')); ?> </li>
                            <li><?php echo $this->Html->link('View Brands', array('controller' => 'productsbrands', 'action' => 'index')); ?> </li>
                            <li><?php echo $this->Html->link('View Ranges', array('controller' => 'productsranges', 'action' => 'index')); ?> </li>
                            <li><?php echo $this->Html->link('View Categories', array('controller' => 'productscategories', 'action' => 'index')); ?> </li>
                            <li><?php echo $this->Html->link('Products Used', array('controller' => 'productsinstances', 'action' => 'index')); ?> </li>

                        </ul>
                    </li>
                    <li><?php echo $this->Html->link('Suppliers', array('controller' => 'suppliers', 'action' => 'index')); ?> </li>
                    <li><?php echo $this->Html->link('Orders', array('controller' => 'orders', 'action' => 'index')); ?> </li>
                    <li><?php echo $this->Html->link('Receive Orders', array('controller' => 'deliveries', 'action' => 'index')); ?> </li>
                    <li><?php echo $this->Html->link('Log Out', array('controller' => 'users', 'action' => 'logout')); ?> </li>

                </ul>
                <?php
            } else {
                ?>
                <li><?php echo $this->Html->link('Log In', array('controller' => 'users', 'action' => 'login')); ?> </li>

                <?php
            }
            ?>
        </ul>


    </div>
    <div id="container">

        <div id="content">

            <?php echo $this->Session->flash(); ?>

            <?php echo $this->fetch('content'); ?>
        </div>

    </div>
    <?php echo $this->element('sql_dump'); ?>


</body>

</html>
